// [[ OnflowGenerator Entity UUID: 846f0b0506964cf0a867268227e95450 ]]
package com.itdct.onflow.system.api.entity

import com.baomidou.mybatisplus.annotation.TableName
import com.itdct.onflow.core.annotation.Column
import com.itdct.onflow.core.annotation.ColumnRelateDict
import com.itdct.onflow.core.annotation.TableDescription
import com.itdct.onflow.core.entity.BaseEntity

/**
 * @author Zhouwx
 * @date 2025/8/25 9:52:11
 * @version 1.0
 * @description
 */
@TableDescription("系统接口")
@TableName("sys_api")
class SysApiEntity : BaseEntity() {
    @Column(comment = "接口名称", nullable = false, length = 200, sort = 10, indexed = true, forSelect = true)
    var name = ""

    @Column(comment = "接口地址", nullable = false, length = 200, sort = 20, indexed = true, forSelect = true)
    var url = ""

    /**
     * 0：无控制，10：登录控制，20：权限控制
     */
    @ColumnRelateDict(dictCode = "sysApiControlType")
    @Column(comment = "接口控制类型", nullable = false, defaultValue = "0", sort = 30)
    var controlType = 0

    @Column(comment = "请求方式", nullable = false, defaultValue = "POST", length = 10, sort = 40)
    var method = ""

    @Column(comment = "所属模块", nullable = false, length = 100, sort = 50)
    var moduleName = ""

    @Column(comment = "是否启用", nullable = false, defaultValue = "1", sort = 60)
    var enable = true

    @ColumnRelateDict(dictCode = "platformType")
    @Column(comment = "平台类型", nullable = false, length = 64, defaultValue = "onflow-backend", indexed = true, sort = 2)
    var platformType = ""

    @Column(comment = "备注", length = 500, sort = 500)
    var remark: String? = null
}